package com.qfjy.homework.xujianyuan;

/**
 * @author:XuJianYuan
 * @date:2023/6/29 17:15
 * @version:1.0
 * 接口实现类
 */
public class MyInterfaceImpl implements MyInterface{
    @Override
    public String printInfo(String info) {
        return info;
    }


//        测试代码
    public static void main(String[] args) {
//        实例化动态代理类
        MyInterfaceProxyClass myInterfaceProxyClass = new MyInterfaceProxyClass();
//        调用方法,获取代理对象
        MyInterface targetProxyClass =(MyInterface)myInterfaceProxyClass.getTargetProxyClass(new MyInterfaceImpl());
//        执行接口方法printInfo
        targetProxyClass.printInfo("hello doc,i am tenk.");
    }
}
